home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / Samples / Exchange / Custom Recipient / recipient.bas next >
Encoding:
BASIC Source File  |  1999-02-04  |  1001 b   |  36 lines

  1. Attribute VB_Name = "Module1"
  2. Sub Main()
  3.  
  4. '-------------------------------------------------------
  5. '-----CREATING A CUSTOM RECIPIENT ----------------------
  6. '--------------------------------------------------------
  7.  
  8.  
  9. '---- Server, Org and Site information
  10. server = "exchsrv55"
  11. org = "Microsoft"
  12. site = "Redmond"
  13.  
  14. '--- Custom Recipient-----
  15. strDisplayname = "John Smith"
  16. strAlias = "jsmith"
  17. strTelephone = "867-5309"
  18.  
  19. '--- Build adsPath that looks like this: LDAP://myserver/CN=Recipients, OU=Site, O=Org
  20. adsPath = "LDAP://" + server
  21. adsPath = adsPath + "/cn=Recipients,OU="
  22. adsPath = adsPath + site
  23. adsPath = adsPath + ",O="
  24. adsPath = adsPath + org
  25.  
  26.  
  27. Set objCont = GetObject(adsPath)
  28. Set objNewCR = objCont.Create("Remote-Address", CStr("cn=" & strAlias))
  29. objNewCR.Put "cn", CStr(strDisplayname)
  30. objNewCR.Put "uid", CStr(strAlias)
  31. objNewCR.Put "telephoneNumber", CStr(strTelephone)
  32. objNewCR.Put "Target-Address", "SMTP:jsmith@microsoft.com"
  33. objNewCR.SetInfo
  34.  
  35. End Sub
  36.